package com.example.data.factory.service.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.data.factory.common.Dto.*;
import com.example.data.factory.common.result.R;
import com.example.data.factory.entity.entity.Script;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author lhy
 * @since 2025-03-03
 */
public interface ScriptService extends IService<Script> {

    R<Script> search(SearchScriptDto searchScriptDto);

    R<Script> insert(InsertScriptDto insertScriptDto, HttpServletRequest request, MultipartFile file);

    R<Script> updatestatus(UpdateScriptStatusDto updateScriptStatusDto);

    R<Script> updatestatusbash(List<UpdateScriptStatusDto> updateScriptStatusDtos);

    R<Script> delete(DeleteScriptDto deleteScriptDto);

    R<Script> searchbyid(DeleteScriptDto deleteScriptDto);

    R<Script> updates(UpdateScriptDto updateScriptDto, MultipartFile file);

    R<Map<String, String>> updatesBatch(ScriptClassifyBatch scriptClassifyBatch);

    R<String> testScriptById(Integer scriptId, String inputData);

    Map<String, String> testInterfaces(Integer scriptId);
}
